cmake_minimum_required(VERSION 3.12 FATAL_ERROR)
SET(CMAKE_CXX_STANDARD 17)
SET(CMAKE_CXX_STANDARD_REQUIRED ON)

PROJECT(ParseCDB)

if(NOT DEFINED CMAKE_DEBUG_POSTFIX)
	SET(CMAKE_DEBUG_POSTFIX "_d")
endif()

set(CDB_CODE
	AnsysAPDLReaderBase.cpp
	AnsysAPDLReaderBase.h
	AnsysAPDLReader_EBLOCK.cpp
	AnsysAPDLReader_EBLOCK.h
	AnsysAPDLReader_NBLOCK.cpp
	AnsysAPDLReader_NBLOCK.h
	AnsysDataDef.h
	AnsysReaderMgr.cpp
	AnsysReaderMgr.h
	CDBReader.cpp
	CDBReader.h
	Define.h
	ReadCDB.cpp
	ReadCDB.h
	ReadMesh.cpp
	ReadMesh.h
	StringTool.cpp
	StringTool.h
	TxtMemStream.cpp
	TxtMemStream.h
	Util.cpp
	Util.h
	Macro.h
	AnsysDef.h
	AnsysMeshDef.h
	Headers.h
	Includes.h
	Num3.h
	Num6.h
	SimdroidMeshDef.h
	AnsysAPDLReader_Select.cpp
	AnsysAPDLReader_Select.h
	AnsysAPDLReader_ET.cpp
	AnsysAPDLReader_ET.h
)

file(GLOB vtk_libs ${CMAKE_SOURCE_DIR}/ThirdParty/VTK/Windows/lib/*.lib)
add_library(${PROJECT_NAME} SHARED ${CDB_CODE})

target_link_libraries(${PROJECT_NAME} ${PYTHON_LIBS} )
target_link_libraries(${PROJECT_NAME} ${VTK_LIBRARIES} )